package com.tws.pctask.model.registerManageModel;

import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * @Description： 存储表 生成表名类
 * @Author: wbf
 * @Date: 2022/1/21 22:35
 */
@Data
@AllArgsConstructor
public class CreatTables {
    /**
     * 用户id
     */
    private String userId;
    /**
     * 部门表名称
     */
    private String departmentTableName;
    /**
     * 仓库名称
     */
    private String storehouseName;

    /**
     * 根据用户id构造表名
     * @param userId 用户id
     */
    public CreatTables(String userId){
        this.userId = userId;
        this.departmentTableName = "`"+ userId + "_" + "department" +"`";
        this.storehouseName = "`"+ userId + "_" + "storehouse" +"`";
    }
}
